{layout layout_main.html}
<div id="index" >
	<div id="main">
		<div class="indexBox">
			<h2>单页面快速管理</h2>
			<ul class="page">
				{loop Admin::run()->page_list() $k $v}
				<li><a href="page_edit.html?id={$v['id']}" class="child{$v['parent_id']>0?0:1}" target="_blank" title="{htmlentities($v['page_name'])}">{Helper::sub_str($v['page_name'],18)}</a></li>
				{/loop}
				<div class="clear"></div>
			</ul>
		</div>
		<table width="100%" border="0" cellspacing="0" cellpadding="0" class="indexBoxTwo">
			<tr>
				<td width="50%" valign="top" class="pr">
					<div class="backupBox">
						<div class="indexBox" style="padding-bottom: 5px;">
							<h2>数据库备份状态</h2>
							{php}
								$backup_files = Admin::run()->table_backup_files();
								$backup_files = array(current($backup_files), $backup_end=end($backup_files));
								$backup_diff_day = date('Y',$backup_end['filemtime'])>2000?ceil((time() - $backup_end['filemtime'])/86400):0;
							{/php}
							{if $backup_diff_day}
							<div class="backup">
								{loop $backup_files $k $v}
								<dl>
									<dd class="date">{date('Y-m-d H:i:s', $v['filemtime'])}</dd>
									<dt>{$v['basename']}</dt>
									<dd class="size">{$v['filesize']}</dd>
								</dl>
								{/loop}
							</div>
							{/if}
						</div>
						<div class="prompt">
							<span class="text">备份提示！<em>{$backup_diff_day}天前您进行了数据备份</em></span>
							<a href="backup.html" class="btnBackup">立即数据备份</a>
						</div>
					</div>
					<div class="indexBox">
						<h2>网站基本信息</h2>
						<div class="siteInfo">
							<?php $table_summary = Admin::run()->table_summary();?>
							<ul>
								<li>文章总数：{$table_summary['article']}</li>
								<li>商品总数：{$table_summary['product']}</li>
								<li>后台用户：{$table_summary['admin']}</li>
								<li>单页面数：{$table_summary['page']}</li>
								<li>会员总数：{$table_summary['member_list']}</li>
								<li>会员订单：{$table_summary['member_orders']}</li>
							</ul>
							<ul>
								<li>数据缓存：{$site_config['db_cache_time']} (秒)</li>
								<li>模板缓存：{$site_config['tpl_cache_time']} (秒)</li>
								<li>图片验证码：{$site_config['img_captcha']?'启用':'停用'}</li>
								<li>站点模板：{$site_config['site_theme']}</li>
								<li>手机模板：{$site_config['mobile_theme']}</li>
								<li>云邮件：{$site_config['mail_cloud']?'启用':'停用'}</li>
							</ul>
							<ul class="last long">
								<li>microCMS版本：Release {Esite::app()->api_version}</li>
							</ul>
						</div>
					</div>
				</td>
				<td valign="top" class="pl">
					<div class="indexBox">
						<h2>管理员登录记录<em>（操作时间/操作者/IP地址）</em></h2>
						<table class="adminLog">
							{loop Admin::run()->admin_log(5) $row}
							<tr>
								<td>{$row['ip']}</td>
								<td>{$row['user_name']}</td>
								<td>{Helper::sub_str($row['action'], 32)}</td>
								<td>{$row['create_time']}</td>
							</tr>
							{/loop}
						</table>
					</div>
					<div class="indexBox">
						<h2>服务器信息</h2>
						<div class="siteInfo">
							<?php $server_status = Admin::run()->server_status(); ?>
							<ul>
								<li>PHP 版本：{$server_status['php_version']}</li>
								<li>最大上传文件：{$server_status['upload_max_filesize']}</li>
								<li>GD 库支持：{$server_status['gd_info']['GD Version']}</li>
								<li>短标签支持：{$server_status['short_open_tag']?'支持':'不支持'}</li>
								<li>时区设置：{$server_status['date.timezone']}</li>
								<li>Socket 支持：{$server_status['socket_accept']?'支持':'不支持'}</li>
								<li>sqlite：{$server_status['sqlite']['versionString']}</li>
								<li title="{$server_status['server']['SERVER_SOFTWARE']}">解译引擎：{Helper::sub_str($server_status['server']['SERVER_SOFTWARE'], 22)}</li>
								<li>Curl：{$server_status['curl_init']?'支持':'不支持'}</li>
								<li>脚本最大内存：{$server_status['memory_limit']}</li>
								<li>post最大限制：{$server_status['post_max_size']}</li>
								<li>打开远程文件：{$server_status['allow_url_fopen']?'支持':'不支持'}</li>
							</ul>
							<ul class="last long">
								<!--<li>绝对路径：{$server_status['document_root']}</li>-->
								<li>服务器标识：{implode(' ', $server_status['os'])}</li>
							</ul>
						</div>
					</div>
				</td>
			</tr>
		</table>
		<div class="clear"></div>
		<div class="indexBox">
			<h2>系统开发</h2>
			<ul class="powered">
				<li>microCMS开源项目：
					<a href="https://github.com/973432436/microCMS" target="_blank">https://github.com/973432436/microCMS</a> ， 
					<a href="https://gitee.com/fancanjie/microCMS" target="_blank">https://gitee.com/fancanjie/microCMS</a>
				</li>
				<li>贡献者：fancanjie, ebers</li>
				<li>系统使用协议：<em>您可以免费使用microCMS（不限商用），但必须保留相关版权信息。</em></li>
			</ul>
		</div>
	</div>
</div>